Skip to content

Conversation

@JoshuaMoelans
Copy link
Member

@JoshuaMoelans JoshuaMoelans commented Sep 30, 2025

Fixes #1350

For now, this is only propagated on outgoing requests. The handling of incoming requests was initially added too (see commit range), but this is not required (yet) by our spec.

Related docs PR getsentry/sentry-docs#15162


Develop Docs:
propagatetraceparent
w3c-trace-context-header

@JoshuaMoelans JoshuaMoelans marked this pull request as ready for review October 3, 2025 10:29
cursor[bot]

This comment was marked as outdated.

@JoshuaMoelans
Copy link
Member Author

@sentry review

cursor[bot]

This comment was marked as outdated.

@JoshuaMoelans
Copy link
Member Author

@sentry review

Copy link
Collaborator

@supervacuus supervacuus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, that looks great; only minor things.

What I currently miss is a user-facing explanation of the hierarchy between sentry-trace and traceparent on the incoming side (which is unaffected by propagate_traceparent). That's totally fine if it's evident in the accompanying docs.

Also, does this currently test an outgoing traceparent coexisting with a sentry-trace (they are not mutually exclusive when outgoing, right)?

bool attach_screenshot;
bool crashpad_wait_for_upload;
bool enable_logging_when_crashed;
bool propagate_traceparent;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One of these days, we should convert all these flags to bitfields. But not in this PR.

JoshuaMoelans and others added 6 commits October 7, 2025 14:27
Co-authored-by: Mischan Toosarani-Hausberger <[email protected]>
Co-authored-by: Mischan Toosarani-Hausberger <[email protected]>
Co-authored-by: Mischan Toosarani-Hausberger <[email protected]>
Co-authored-by: Mischan Toosarani-Hausberger <[email protected]>
* cleanup

* remove feature of parsing incoming traceparent

* re-add len macros
@JoshuaMoelans JoshuaMoelans changed the title (WIP) feat: traceparent header support feat: outgoing traceparent header support Oct 8, 2025
@github-actions
Copy link

github-actions bot commented Oct 8, 2025

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 763acd4

@JoshuaMoelans JoshuaMoelans merged commit 5d60bff into master Oct 8, 2025
42 checks passed
@JoshuaMoelans JoshuaMoelans deleted the joshua/feat/traceparent branch October 8, 2025 12:04
JoshuaMoelans added a commit to getsentry/sentry-docs that referenced this pull request Oct 9, 2025
Vercel previews:
-
[options](https://sentry-docs-git-joshua-featpropagatetraceparentoption.sentry.dev/platforms/native/configuration/options/#propagate-traceparent)
- [trace propagation
example](https://sentry-docs-git-joshua-featpropagatetraceparentoption.sentry.dev/platforms/native/tracing/trace-propagation/custom-instrumentation/)

## DESCRIBE YOUR PR
Documents the changes from
getsentry/sentry-native#1394

## IS YOUR CHANGE URGENT?  

Help us prioritize incoming PRs by letting us know when the change needs
to go live.
- [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE -->
- [ ] Other deadline: <!-- ENTER DATE HERE -->
- [x] None: Not urgent, can wait up to 1 week+

## SLA

- Teamwork makes the dream work, so please add a reviewer to your PRs.
- Please give the docs team up to 1 week to review your PR unless you've
added an urgent due date to it.
Thanks in advance for your help!

## PRE-MERGE CHECKLIST

*Make sure you've checked the following before merging your changes:*

- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add traceparent header support for sentry-native

2 participants